package qeb.handheldmedical;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.TextView;

/**
 * Created by sugar on 2019/1/24.
 */

public class LRLayout extends FrameLayout{

    private TextView tvLeft;
    private TextView tvRight;

    public LRLayout(@NonNull Context context) {
        super(context);
        init();
    }



    public LRLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public LRLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }


    private void init() {
        View inflate = LayoutInflater.from(getContext()).inflate(R.layout.lr_layout, this);
        tvLeft = inflate.findViewById(R.id.tvLeft);
        tvRight = inflate.findViewById(R.id.tvRight);

    }

    public void left(String str){
        tvLeft.setText(str);
    }
    public void right(String str){
        tvRight.setText(str);
    }

}
